JpGraph 1.2

 

A PHP4 Object Oriented graph drawing library

 

Document revision: RA3

 

Johan Persson, 2001-03-13

 

 

 

 

 

Revision history:

Date

Version

Doc rev

Who

State

2001-01-28

1.0

DA1

J. Persson

Draft

2001-02-04

1.0

RA1

J. Persson

Initial public release

2001-02-19

1.1

RA2

J. Persson

Updated for 1.1

2001-03-13

1.2

RA3

J. Persson

Updated for 1.2

 

 


Table of contents

 

1     Introduction. 4

1.1      Version. 4

1.2      Features. 4

1.3      Planned future addition. 4

1.4      Known bugs and omissions. 5

1.5      Acknowledgements. 5

1.6      Implementing an OO library in PHP4. 5

1.7      Getting the latest version. 5

1.8      Reporting bugs and suggested improvements. 6

1.9      Software License. 6

2     Installation. 7

2.1      Customizing the installation. 7

2.2      Required files. 7

2.3      Plot extension modules. 7

2.4      Graphic libraries requirements for PHP 4.02 and above. 7

3     Quick start on how to use JpGraph. 8

3.1      Generating images with PHP. 8

3.2      A first example. 8

3.3      Adding plot marks to line graphs. 11

3.4      Adding several plots to the same graph. 11

3.5      Adding a second Y-scale. 12

3.6      Adding a legend to the plot 13

3.7      Using the “Step style” to render line plots. 15

3.8      Using a logarithmic scale. 16

3.9      Using different combination of scales. 16

3.10     Adding more gridlines to the plot 18

3.11     Specifying the labels for X-axis. 19

3.12     Adjusting the ticks on a text scale. 19

3.13     Using filled line graphs. 20

3.14     Using accumulated line graphs. 20

3.15     Using elementary bar graphs. 21

3.16     Adjusting the width of the bars. 22

3.17     Using grouped bar graphs. 23

3.18     Using accumulated bar graphs. 24

3.19     Using grouped accumulated bar graphs. 25

3.20     Using error plots. 25

3.21     Using line error plots. 26

3.22     Combining different types of plots. 27

3.23     Adding text to the graph. 28

3.24     Using scatter plots. 29

3.25     Using impuls scatter plots. 30

3.26     Using Pie Plots. 32

3.27     Changing size and position for the pie chart 33

3.28     Adding several pie chart to the same graph. 33

3.29     Additional modifications to pie plots. 35

4     Using Spider Plots. 36

4.1      Introduction. 36

4.2      Creating a simple spider graph. 36

4.3      Controlling size and position of plot 37

4.4      Specifying titles for the axis and legends for plots. 38

4.5      Specifying gridlines. 39

4.6      Setting background color and frame. 40

4.7      Adding several plots to a spider graph. 41

5     Advanced features of JpGraph. 43

5.1      Using grace percentage on scales. 43

5.2      Timing the generation of graphs. 44

5.3      Using color gradient fill 45

5.4      Specifying fonts. 47

5.5      Using Anti-Aliasing. 48

5.6      JpGraph global defines. 50

5.7      Drawing arbitrary graphic shapes using dummy graphs. 50

5.8      Utility scripts. 51

JpGraph color chart 51

6     Using the cache mechanism and other performance related questions. 53

6.1      Performance considerations. 53

6.2      Using the cache mechanism.. 53

7     Jpgraph reference. 55

7.1      Conventions. 55

7.2      Class overview.. 55

7.3      Public Class references. 56

7.3.1       Class Graph. 57

7.3.2       Class Axis. 63

7.3.3       Class Ticks. 67

7.3.4       Class Text 70

7.3.5       Class Grid. 74

7.3.6       Class LinearTicks. 77

7.3.7       Class LinearScale. 79

7.3.8       Class LogTicks. 84

7.3.9       Class LogScale. 86

7.3.10      Class Legend. 88

7.3.11      Class LinePlot 91

7.3.12      Class AccLinePlot 94

7.3.13      Class PlotMark. 95

7.3.14      Class BarPlot 98

7.3.15      Class GroupBarPlot 100

7.3.16      Class AccBarPlot 101

7.3.17      Class ErrorPlot 102

7.3.18      Class Plot 104

7.3.19      Class ErrorLinePlot 108

7.3.20      Class SpiderGraph. 109

7.3.21      Class SpiderAxis. 113

7.3.22      Class SpiderPlot 115

7.3.23      Class SpiderGrid. 119

7.3.24      Class ScatterPLot 120

7.3.25      Class PieGraph. 121

7.3.26      Class PiePlot 123

7.4      Internal class reference. 126

7.3.27      Class ImgStreamCache. 127

7.3.28      Class Image. 129

7.3.29      Class TTF. 139

7.3.30      Class Gradient 140

7.3.31      Class RGB.. 141

7.3.32      Class FontProp. 147

7.3.33      Class RotImage. 148

7.3.34      Class ClassName. 149

7.3.35      Class ClassName. 150


Introduction.htm

Installation.htm

Quick start how to use JpGraph.htm

Using Spider Plots.htm

Advanced feature of JpGraph.htm

Using the cache mechanism and performance questions.htm

Jpgraph reference.htm